home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-04 / tm480.zip / TMMANUAL.EXE / SCRMAN.TSK < prev    next >
Text File  |  1991-09-10  |  5KB  |  254 lines

  1. ; Author  : Steve Johnson - FmP.                      Version : 1.11
  2. ; Purpose : On-Line SCREEN TEMPLATE PROCESSOR manual  Date    : 13/06/91 
  3. ; Notes   : Uses DISPLAY system variable as name of next form.
  4. ;         : If not colour video task assumes single screen page and uses a
  5. ;         : POPUP for virtually indistinguishable results.
  6. ; 1.11    : implemented PgUp/PgDn instead of left/right on browse
  7. GOTO 1INIT
  8. 1START
  9. move 8000h to bbmask
  10. MENU 1,"HORIZONTAL"
  11. OPTION 1,1
  12.  
  13.   GOTO 1OPTION
  14.  
  15. OPTION 1,2
  16.   if colour
  17.     screen 2
  18.     switch 2
  19.   else
  20.     cursor 0 0
  21.     popup popid_1 screen_1 7 1
  22.   fi
  23.   move true to bbdisp
  24.   clear choice
  25.   until choice = 30
  26.     move 8000h to bbmask
  27.     put "MAIN" noclear
  28.     if choice ne 30
  29.       move display to extra_help
  30.       trim extra_help
  31.       put extra_help wait 0 noclear
  32.       clear bbdisp
  33.       if extra_help sw "SYMBOLS"
  34.     inkey char
  35.     move true to bbdisp
  36.       fi
  37.     fi
  38.   fi
  39.   move 2 to choice
  40.   if colour
  41.     screen 0
  42.     switch 0
  43.   else
  44.     popdown popid_1
  45.     popfree popid_1
  46.   fi
  47.   RETURN
  48. OPTION 1,3,7
  49.   MOVE HILITE TO VHILITE
  50.   move choice to formval
  51.   UNTIL CHOICE = 30
  52.     move 08018h to bbmask ;esc, <esc>, left and right
  53.     move ENTRY VHILITE OF Vmemory to choice
  54.     PUT ENTRY VHILITE OF VERTICALS noclear
  55.     move hilite to entry VHILITE OF Vmemory
  56.     IF CHOICE < 30
  57.       if colour
  58.     screen 1
  59.     switch 1
  60.       else
  61.     cursor 0 0
  62.     popup popid_1 screen_1 7 1
  63.       fi
  64.       move display to extra_help
  65.       trim extra_help
  66.       move true to bbdisp
  67.       if extra_help ne "USERLINE"
  68.     put extra_help NOCLEAR
  69.       else
  70.     put extra_help NOWAIT
  71.     inkey char
  72.     display cls
  73.       fi
  74.       if colour
  75.     switch 0
  76.     BACK 1
  77.     display cls
  78.     screen 0
  79.       else
  80.     popdown popid_1
  81.     popfree popid_1
  82.       fi
  83.       clear bbdisp
  84.     else
  85.       if choice = 41 
  86.         decrement vhilite
  87.         MOVE VHILITE TO CHOICE
  88.         move true to bbdisp
  89.         if vhilite > 2
  90.       return 100
  91.         else
  92.           return
  93.         fi
  94.         clear bbdisp
  95.       else
  96.     if choice = 42 
  97.           increment vhilite
  98.           MOVE VHILITE TO CHOICE
  99.           move true to bbdisp
  100.           if vhilite < 8
  101.         return 100
  102.           else
  103.          return
  104.           fi
  105.           clear bbdisp
  106.     FI
  107.       FI
  108.       if choice = 30
  109. ;        PUT entry vhilite OF blank_verticals nowait
  110.       FI
  111.     FI
  112.   FI
  113.   CURSOR 20 10 60
  114.   MOVE VHILITE TO CHOICE
  115.   RETURN
  116. OPTION 1,8
  117. OPTION 1,30
  118.   stop
  119. endm 1
  120.  
  121. 1OPTION
  122. if colour
  123.   screen 2
  124.   switch 2
  125. else
  126.   cursor 0 0
  127.   popup popid_1 screen_1 7 1
  128. fi
  129. move 1 to formval
  130. until choice = 30
  131.   if formval = 1
  132.     move 0c002h to bbmask ;F1, <esc> and PgDn
  133.   else
  134.     if formval = 6
  135.       move 0c004h to bbmask ;F1, <esc> and PgUp
  136.     else
  137.       move 0c006h to bbmask ;F1, <esc>, PgUp and PgDn
  138.     fi                                               
  139.   fi
  140.   move entry formval of form_names to form_name
  141.   move entry formval of form_hilites to choice
  142.   put form_name
  143.   if choice = 30
  144.     if colour
  145.       screen 0
  146.       switch 0
  147.     else
  148.       popdown popid_1
  149.       popfree popid_1
  150.     fi
  151.     CLEAR CHOICE
  152.     RETURN
  153.   fi
  154.   if choice = 43 and formval > 1   ;PgUp key
  155.     decrement formval
  156.     move true to bbdisp
  157.   else
  158.     if choice = 44 and formval < 6 ;PgDn key
  159.       increment formval
  160.       move true to bbdisp
  161.     else
  162.       move hilite to entry formval of form_hilites
  163.       if choice < 30               ;normal selection
  164.     if colour
  165.       screen 1
  166.       switch 1
  167.     fi
  168.     move display to extra_help
  169.     trim extra_help
  170.     if extra_help ne "USERLINE"
  171.       put extra_help NOCLEAR
  172.     else
  173.       put extra_help NOWAIT
  174.       inkey char
  175.     fi
  176.     if colour
  177.       switch 2
  178.       BACK 1
  179.       display cls
  180.       screen 2
  181.       clear bbdisp
  182.     fi
  183.       else
  184.     if choice = 31 ;Help key
  185.           popscreen ui
  186.       put "USER_INTERFACE" wait 0 noclear
  187.       inkey char
  188.           clear bbdisp
  189.           popdown ui
  190.           popfree ui
  191.     fi
  192.       fi
  193.     fi
  194.   fi
  195. fi
  196. GOBACK 1RETURN
  197.  
  198. 1INIT
  199.  
  200. int ui
  201. int vhilite
  202. int popid_1
  203. int formval
  204.  
  205. ;var blank_verticals,3,occurs 10,"         BL1BL2BL3BL4BL5"
  206. var char,1
  207. var extra_help,10,"  SCRMAN"
  208. var fmpdir,40,$FMPDIR
  209. var form_names,2,occurs 7,"  M0M1M2M3M4M5"
  210. var form_hilites,1,occurs 7
  211. var form_name,2
  212. var formsname,50
  213. var null,1
  214. var screen_1,80,occurs 24
  215. var verticals,3,occurs 10,"         GENDATMENGRAATT"
  216. var vmemory,2,occurs 10
  217.  
  218. VCONST CLS,11
  219.  
  220. end
  221.  
  222. if fmpdir = null
  223.   move "C:\FMP" to fmpdir
  224. fi
  225. combine fmpdir '\scrman.ovr' into formsname
  226. replace '\\' of formsname with '\'
  227. lookfor formsname
  228. if not found
  229.   combine fmpdir '\logon.ovr' into formsname
  230.   replace '\\' of formsname with '\'
  231.   forms formsname ;in case /q and not registered
  232.   insert extra_help extra_help
  233.   put "NO_FORMS"
  234.   stop
  235. fi
  236. forms formsname
  237. if colour
  238.   BACK 1        ;Clear screens to BLUE
  239.   screen 1
  240.   display cls
  241.   screen 2
  242.   display cls
  243. fi
  244. screen 0
  245. put "H_FRAME" wait 0 noclear
  246.  
  247. GOBACK 1START
  248.  
  249. endtask
  250. Forms source kept in separate file called SCRMAN.MAC.
  251. Run TMMANUAL to recreate it if deleted.
  252.  
  253. 
  254.